home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / VideoToolbox 95.04.18 / VideoToolboxSources / ATMInterface.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-10  |  1.9 KB  |  81 lines  |  [TEXT/MMCC]

  1. /*
  2.  * ATMInterface.h
  3.  *
  4.  * Version 1.01
  5.  *
  6.  * Adobe Type Manager is a trademark 
  7.  * of Adobe Systems Incorporated.
  8.  */
  9. /*
  10. HISTORY:
  11. 9/7/94 dgp cosmetic editing. Added pragma once.
  12. 9/10/94 dgp changed struct function pointer fields to UniversalProcPtr fields.
  13. */
  14.  
  15. #pragma once
  16. #define _H_ATMInterface
  17. #include <Devices.h>
  18. #include <Types.h>
  19.  
  20. typedef struct
  21. {
  22.     Fixed a, b, c, d, tx, ty;
  23. } FixedMatrix;
  24.  
  25. #define ATMProcs3Version 3
  26. typedef struct
  27. {
  28.     long version;
  29.     #ifdef __powerc
  30.         UniversalProcPtr fontAvailable,showText,xyshowText;
  31.     #else
  32.         short (*fontAvailable)(short family,
  33.              short style);
  34.         short (*showText)(char *text, 
  35.             short length, FixedMatrix *matrix);
  36.         short (*xyshowText)(char *text, 
  37.             short length, FixedMatrix *matrix,
  38.             Fixed *displacements);
  39.     #endif
  40. } ATMProcs3;
  41.  
  42. #define ATMProcsStatusCode 0
  43.  
  44. /*
  45.     initATM initializes ATMInterface, if not already initialized. Returns 
  46.     1 if and only if ATM is available and
  47.     the procsets are correctly initialized
  48. */
  49. short initATM(void);
  50.  
  51. /* 
  52.     fontAvailableATM returns 1 if and 
  53.     only if ATM can image the specified 
  54.     family and style 
  55. */
  56. short fontAvailableATM(short family,short style);
  57.  
  58. /* 
  59.     showTextATM shows length characters
  60.     starting at text transformed by 
  61.     the specified matrix 
  62.     Returns the number of characters not shown */
  63. /*     Matrix maps one point character space to device space, */
  64. /* relative to current pen position */
  65. /* Matrix's tx and ty components are updated */
  66. short showTextATM(char *text,short length,FixedMatrix *matrix);
  67.  
  68. /*
  69.     Show length characters starting 
  70.     at text transformed by the specified 
  71.     matrix.
  72.     Matrix maps one point character space 
  73.     to device space, relative to current pen position.
  74.     Matrix's tx and ty components are updated.
  75.     Character x and y widths are specified 
  76.     by displacements.
  77.     Returns the number of characters not shown.
  78. */
  79. short xyshowTextATM(char *text, short length, 
  80.     FixedMatrix *matrix, Fixed *displacements);
  81.